//2974.最小数字游戏
//https://leetcode.cn/problems/minimum-number-game
class Solution {
public:
    vector<int> numberGame(vector<int>& nums) {
        vector<int> ret;
        int n = nums.size();
        ret.reserve(n);
        sort(nums.begin(),nums.end());
        for(int i = 1;i<n;i+=2)
        {
            ret.push_back(nums[i]);
            ret.push_back(nums[i-1]);
        }
        return ret;
    }
};